package niord.apps;

public class Order {

	int id;
	int personId;
	int productId;
	int quantity;

	Boolean toDelete;

	public Order(Long id, Long personId, Long productId, Long quantity) {
		super();
		this.id = id.intValue();
		this.personId = personId.intValue();
		this.productId = productId.intValue();
		this.quantity = quantity.intValue();
		toDelete = false;
	}

	/**
	 * Switch toDelete from true to false and vice versa
	 * 
	 */
	public void switchToDelete() {
		if (!toDelete) toDelete = true;
		else toDelete = false;
	}
	/****************************************/
	/*** id *********************************/
	/****************************************/
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *           the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/***************************************************************/
	/*** Person ****************************************************/
	/***************************************************************/
	/**
	 * @return the personId
	 */
	public int getPersonId() {
		return personId;
	}

	/**
	 * @param personId
	 *           the personId to set
	 */
	public void setPersonId(int personId) {
		this.personId = personId;
	}

	/***************************************************************/
	/*** Product ***************************************************/
	/***************************************************************/
	/**
	 * @return the productId
	 */
	public int getProductId() {
		return productId;
	}

	/**
	 * @param productId
	 *           the productId to set
	 */
	public void setProductId(int productId) {
		this.productId = productId;
	}

	/***************************************************************/
	/*** Quantity **************************************************/
	/***************************************************************/
	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}

	/**
	 * @param quantity
	 *           the quantity to set
	 */
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	
	/***************************************************************/
	/*** toDelete **************************************************/
	/***************************************************************/	
	/**
	 * @return the toDelete
	 */
	public Boolean getToDelete() {
		return toDelete;
	}

	/**
	 * @param toDelete
	 *           the toDelete to set
	 */
	public void setToDelete(Boolean toDelete) {
		this.toDelete = toDelete;
	}
}
